package top.yongyan0624.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import top.yongyan0624.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 讽惘
 * @since 2021-05-13
 */
public interface SysUserService extends IService<SysUser> {

    Page<SysUser> queryList(Page<SysUser> page, String username);

    Page<SysUser> queryUserByRoleName(Page<SysUser> page, String roleName);

    SysUser getByUsername(String username);

    void setRoles(SysUser user);

    SysUser register(String username, String password);

    boolean addUser(SysUser sysUser);

    boolean rolePerm(Long userId, Long[] roleIds);

    String getUserAuthorityInfo(Long userId);

    void clearUserAuthorityInfo(Long userId);

    void clearUserAuthorityInfoByRoleId(Long roleId);

    void clearUserAuthorityInfoByMenuId(Long menuId);

}
